// 初一英语单词数据
export const wordList = [
  // 基础词汇
  { word: 'apple', meaning: '苹果', category: '水果' },
  { word: 'book', meaning: '书', category: '学习用品' },
  { word: 'cat', meaning: '猫', category: '动物' },
  { word: 'dog', meaning: '狗', category: '动物' },
  { word: 'egg', meaning: '鸡蛋', category: '食物' },
  { word: 'fish', meaning: '鱼', category: '动物' },
  { word: 'girl', meaning: '女孩', category: '人物' },
  { word: 'house', meaning: '房子', category: '建筑' },
  { word: 'ice', meaning: '冰', category: '自然' },
  { word: 'juice', meaning: '果汁', category: '饮料' },
  { word: 'key', meaning: '钥匙', category: '物品' },
  { word: 'lion', meaning: '狮子', category: '动物' },
  { word: 'milk', meaning: '牛奶', category: '饮料' },
  { word: 'name', meaning: '名字', category: '基础词汇' },
  { word: 'orange', meaning: '橙子', category: '水果' },
  { word: 'pen', meaning: '钢笔', category: '学习用品' },
  { word: 'queen', meaning: '女王', category: '人物' },
  { word: 'red', meaning: '红色', category: '颜色' },
  { word: 'sun', meaning: '太阳', category: '自然' },
  { word: 'tree', meaning: '树', category: '自然' },
  { word: 'umbrella', meaning: '雨伞', category: '物品' },
  { word: 'water', meaning: '水', category: '自然' },
  { word: 'yellow', meaning: '黄色', category: '颜色' },
  { word: 'zoo', meaning: '动物园', category: '地点' },
  
  // 学习相关
  { word: 'student', meaning: '学生', category: '人物' },
  { word: 'teacher', meaning: '老师', category: '人物' },
  { word: 'school', meaning: '学校', category: '地点' },
  { word: 'classroom', meaning: '教室', category: '地点' },
  { word: 'homework', meaning: '家庭作业', category: '学习' },
  { word: 'exam', meaning: '考试', category: '学习' },
  { word: 'pencil', meaning: '铅笔', category: '学习用品' },
  { word: 'ruler', meaning: '尺子', category: '学习用品' },
  { word: 'eraser', meaning: '橡皮', category: '学习用品' },
  { word: 'notebook', meaning: '笔记本', category: '学习用品' },
  
  // 家庭
  { word: 'father', meaning: '父亲', category: '家庭' },
  { word: 'mother', meaning: '母亲', category: '家庭' },
  { word: 'sister', meaning: '姐妹', category: '家庭' },
  { word: 'brother', meaning: '兄弟', category: '家庭' },
  { word: 'family', meaning: '家庭', category: '家庭' },
  { word: 'baby', meaning: '婴儿', category: '家庭' },
  { word: 'grandfather', meaning: '祖父', category: '家庭' },
  { word: 'grandmother', meaning: '祖母', category: '家庭' },
  
  // 食物
  { word: 'bread', meaning: '面包', category: '食物' },
  { word: 'rice', meaning: '米饭', category: '食物' },
  { word: 'meat', meaning: '肉', category: '食物' },
  { word: 'vegetable', meaning: '蔬菜', category: '食物' },
  { word: 'banana', meaning: '香蕉', category: '水果' },
  { word: 'grape', meaning: '葡萄', category: '水果' },
  { word: 'strawberry', meaning: '草莓', category: '水果' },
  { word: 'tomato', meaning: '西红柿', category: '蔬菜' },
  { word: 'potato', meaning: '土豆', category: '蔬菜' },
  { word: 'carrot', meaning: '胡萝卜', category: '蔬菜' },
  
  // 颜色
  { word: 'blue', meaning: '蓝色', category: '颜色' },
  { word: 'green', meaning: '绿色', category: '颜色' },
  { word: 'black', meaning: '黑色', category: '颜色' },
  { word: 'white', meaning: '白色', category: '颜色' },
  { word: 'purple', meaning: '紫色', category: '颜色' },
  { word: 'pink', meaning: '粉色', category: '颜色' },
  { word: 'brown', meaning: '棕色', category: '颜色' },
  { word: 'gray', meaning: '灰色', category: '颜色' },
  
  // 数字
  { word: 'one', meaning: '一', category: '数字' },
  { word: 'two', meaning: '二', category: '数字' },
  { word: 'three', meaning: '三', category: '数字' },
  { word: 'four', meaning: '四', category: '数字' },
  { word: 'five', meaning: '五', category: '数字' },
  { word: 'six', meaning: '六', category: '数字' },
  { word: 'seven', meaning: '七', category: '数字' },
  { word: 'eight', meaning: '八', category: '数字' },
  { word: 'nine', meaning: '九', category: '数字' },
  { word: 'ten', meaning: '十', category: '数字' },
  
  // 动物
  { word: 'bird', meaning: '鸟', category: '动物' },
  { word: 'rabbit', meaning: '兔子', category: '动物' },
  { word: 'tiger', meaning: '老虎', category: '动物' },
  { word: 'elephant', meaning: '大象', category: '动物' },
  { word: 'monkey', meaning: '猴子', category: '动物' },
  { word: 'panda', meaning: '熊猫', category: '动物' },
  { word: 'bear', meaning: '熊', category: '动物' },
  { word: 'wolf', meaning: '狼', category: '动物' },
  { word: 'fox', meaning: '狐狸', category: '动物' },
  { word: 'deer', meaning: '鹿', category: '动物' },
  
  // 身体部位
  { word: 'head', meaning: '头', category: '身体' },
  { word: 'eye', meaning: '眼睛', category: '身体' },
  { word: 'nose', meaning: '鼻子', category: '身体' },
  { word: 'mouth', meaning: '嘴巴', category: '身体' },
  { word: 'ear', meaning: '耳朵', category: '身体' },
  { word: 'hand', meaning: '手', category: '身体' },
  { word: 'foot', meaning: '脚', category: '身体' },
  { word: 'leg', meaning: '腿', category: '身体' },
  { word: 'arm', meaning: '手臂', category: '身体' },
  { word: 'hair', meaning: '头发', category: '身体' },
  
  // 天气
  { word: 'sunny', meaning: '晴朗的', category: '天气' },
  { word: 'rainy', meaning: '下雨的', category: '天气' },
  { word: 'cloudy', meaning: '多云的', category: '天气' },
  { word: 'windy', meaning: '有风的', category: '天气' },
  { word: 'snowy', meaning: '下雪的', category: '天气' },
  { word: 'hot', meaning: '热的', category: '天气' },
  { word: 'cold', meaning: '冷的', category: '天气' },
  { word: 'warm', meaning: '温暖的', category: '天气' },
  { word: 'cool', meaning: '凉爽的', category: '天气' }
]

// 获取随机单词
export function getRandomWords(count = 10) {
  const shuffled = [...wordList].sort(() => 0.5 - Math.random())
  return shuffled.slice(0, count)
}

// 按类别获取单词
export function getWordsByCategory(category) {
  return wordList.filter(word => word.category === category)
}

// 获取所有类别
export function getCategories() {
  return [...new Set(wordList.map(word => word.category))]
} 